

//配置路由
import VueRouter from 'vue-router'


//导入路由组件
import home from './components/tabbar/HomeContainer.vue'
import member from './components/tabbar/MemberContainer.vue'
import search from './components/tabbar/SearchContainer.vue'
import shopcar from './components/tabbar/ShopcarContainer.vue'
import newlist from './components/news/NewList.vue'
import newinfo from './components/news/Newinfo.vue'
import photolist from './components/photos/PhotoList.vue'
import photoinfo from './components/photos/photoinfo.vue'
import goodslist1 from './components/goods/goodslist.vue'
import goodsinfo from './components/goods/goodsinfo.vue'
import goodsdesc from './components/goods/goodsdesc.vue'
import goodscomment from './components/goods/goodscomment.vue'

//创建路由对象  
  const router = new VueRouter({
   routes:[
     {path:'/',redirect:'/home',}, //第一次打开页面直接去home
     { path:'/home',component:home }, //下面4个是导航栏
     { path:'/member',component:member },
     { path:'/search',component:search },
     { path:'/shopcar',component:shopcar },
     { path:'/home/newslist',component:newlist },  //home页面去新闻列表
     { path:'/home/newinfo/:id',component:newinfo,props:true }, //去新闻item
     { path:'/home/photolist',component:photolist}, //去图片分享
     { path:'/home/photoinfo/:id',component:photoinfo,props:true }, //去图片分享
     { path:'/home/goodslist',component:goodslist1 }, //去商品界面
     { path:'/home/goodsinfo/:id',component:goodsinfo,props:true }, //去商品界面
     { path:'/home/goodsdesc/:id',component:goodsdesc,props:true }, //去商品界面里面的图文介绍页面
     { path:'/home/goodscomment/:id',component:goodscomment,props:true }, //去商品界面里面的图文介绍页面
     
   ],
   linkActiveClass:'mui-active'  //被访问到的路由
 })


 export default router